<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>动态广场</title>
    <link rel="stylesheet" href="../css/aui.css">
    <link rel="stylesheet" href="../css/common.css">
    <script type="text/javascript" src="../script/api.js"></script>
    <script language="JavaScript" src="../script/vue.js"></script>
    <script language="JavaScript" src="../script/common.js"></script>
    <style type="text/css">
        .aui-list .aui-list-item-media {
            width: 3rem;
        }
    </style>
</head>
<body>
<div id="dynamic-box" v-cloak>
<section class="aui-content">
    <ul class="aui-list aui-media-list">
        <li class="aui-list-item" v-for="item in dylist" :key="item.id">
            <div class="aui-media-list-item-inner">
                <div class="aui-list-item-media">
                    <img :src="item.product_tumbpic_url"/>
                </div>
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-text">
                        <div class="aui-list-item-title" style="color:#4c5276">{{item.username}}</div>
                    </div>
                    <div class="aui-list-item-text" style="color:#333;">
                       <div> 购买了 <span style="color:#e02e24" @click="gopage(item)" tapmode>{{item.product_title}}</span></div>
                    </div>
                     <div class="aui-info aui-font-size-12" style="padding-top:0; padding-bottom:0">
                        <div class="aui-info-item">{{item.pretime}}</div>
                     </div>
                </div>
            </div>
        </li>

    </ul>
</section>
</div>
<script>
    var p_pagename='dynamic';
</script>

</body>

<script>
    var pvm = new Vue({
        el:'#dynamic-box',
        data:{
             dylist:[]
        },
        methods:{
            gopage:function (item) {
              $page.openwin('product_productinfo', './product/productinfo.html', {
                  id: item.product_id
              });

            },
             getbubble:function () {
                $page.get_data('/api/dynamic/getBubbleList','post',{limit:20},function (ret) {
                    pvm.dylist = ret.data;
                });
                setTimeout("pvm.getbubble();",10000);
            }
        }
    });
   apiready=function(){
         pvm.getbubble();
   }



</script>
</html>
